<div id="tabcontainer">
    <ul>
       <li><a href="#tab1">Danh sách người dùng</a></li>
    </ul>
</div>
<div id="tabsdetail">
    <div id="tab1" class="tabcontents">
        
              <div class="hd">
                 <h2>danh sách người dùng</h2>
                <div class="sub-form">
                	<form action="<?php echo base_url."index.php?mod=user&act=search"; ?>" method="post">
                     <label>Tìm kiếm tài khoản <input type="text" name="key" placeholder="Nhập từ khóa tìm kiếm..." size="28">
                          <button style="cursor: pointer;" name="ok" type="submit"><img src="public/images/search.png" alt=""></button>
                      </label>
                   </form>
                 </div>
                 <table>
                     <thead>
                         <tr>
                             <th>STT</th>
                             <th>Tài khoản</th>
                             <th>Email</th>
                             <th>phone</th>
                             <th>địa chỉ</th>
                             <th>Quyền</th>
                             <th>Action</th>
                         </tr>
                     </thead>
                     <tbody>
                     <?php $stt = 1 ; ?>
                      <?php foreach($data['list'] as $item){ ?>
                          <tr class = "tb1">
                              <td><?php echo $stt++;?></td>
                              <td><?php echo $item['tentaikhoan'];?></td>
                              <td><?php echo $item['email']?></td>
                              <td><?php echo $item['dienthoai']?></td>
                              <td><?php echo $item['diachi']?></td>
                              <td>
                                <?php
                                    if($item['capdo'] == 1){
                                        echo "Admin";
                                    }else if($item['capdo'] == 2){
                                        echo "Nhà quản lý";
                                    }else{
										echo "Nhân viên";
									}
                                ?>
                              </td>
                              <td>
                                  <a href="<?php echo base_url."index.php?mod=user&act=edit&uid=".$item['mataikhoan'].""?>">Sửa</a>
                                  <a onclick='return check()' href="<?php echo base_url."index.php?mod=user&act=del&uid=".$item['mataikhoan'].""?>">Xóa</a>
                              </td>
                          </tr>
                      <?php } ?>
                     </tbody>
                 </table>
                 <div id="pagination"><?php echo $data['pagelist'];?></div>
            </div>
            <ul class="add bh">
                <li><a href="<?php echo base_url.'index.php?mod=user&act=add'?>">Thêm</a></li>
            </ul>
       
    </div>
</div>